package com.vm.common;

public class SqlConstant {
	/**
	 * 根据版块ID查询配置应用sql
	 * @return
	 */
	public static String getAppbySectionIdSql(){
		StringBuffer sbu = new StringBuffer();
		sbu.append(" from AppDetail a where a.section.bkId = ?");
		return sbu.toString();
	}
	
	/**
	 * 根据版块ID查询配置应用总数
	 * @return
	 */
	public static String getAppCountbySectionIdSql(){
		StringBuffer sbu = new StringBuffer();
		sbu.append("select count(alId) from AppDetail a where a.section.bkId = ?");
		return sbu.toString();
	}
	
	/**
	 * 根据业务Id查询业务短信sql
	 * @return
	 */
	public static String getSmsByBusinessIdSql(){
		StringBuffer sbu = new StringBuffer();
		sbu.append(" from SmsDetail a where a.business.ywId = ?");
		return sbu.toString();
	}
	
	/**
	 * 根据业务ID查询业务短信总数
	 * @return
	 */
	public static String getSmsCountbyBusinessIdSql(){
		StringBuffer sbu = new StringBuffer();
		sbu.append("select count(smId) from SmsDetail a where a.business.ywId = ?");
		return sbu.toString();
	}
	
}
